package com.hy.core.response;

import java.io.Serializable;

/**
 * Created by shitou on 17/12/26.
 */
public class ApiResponseDTO implements Serializable {
    private static final long serialVersionUID = -4147653691100564826L;

    private String uuid;
    private Integer code; //响应码
    private String error; //错误信息
    private String responseData = "";//响应体

    public ApiResponseDTO(Integer code, String error, String uuid) {
        this.code = code;
        this.error = error;
        this.uuid = uuid;
    }

    public void initServicesResult(DefaultServicesResult defaultServicesResult) {
        this.code = defaultServicesResult.getStatusCode();
        this.error = defaultServicesResult.getStatusMsg();
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getError() {
        return error;
    }

    public void setError(String error) {
        this.error = error;
    }

    public String getResponseData() {
        return responseData;
    }

    public void setResponseData(String responseData) {
        this.responseData = responseData;
    }
}
